<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">
<h:head>
</h:head>
<h:body>
	<rich:panel id="addClientePanel">
		<f:facet name="header">
			<h:outputText value="#{labels['titleAddPanelClient']}" styleClass="panelTitle"/>
		</f:facet>
		
		<h:form >
			<h:panelGrid columns="3" id="addClienteGrid">
				<h:outputText value="#{labels['name']}" />
				<h:inputText value="#{clienteBean.cliente.nombre}" label="nombreCli"
					id="nombreCli" maxlength="40" required="true" >
				</h:inputText>
				<rich:message for="nombreCli" ajaxRendered="true" />
				
				<h:outputText value="#{labels['phoneNumber']}" />
				<h:inputText value="#{clienteBean.cliente.telefono}" label="tlfCli"
					id="tlfCli" maxlength="20" required="true"
					validatorMessage="#{labels['messageValidatePhonePattern']}" >
					<f:validateRegex pattern="#{labels['phonePattern']}"/>
				</h:inputText>
				<rich:message for="tlfCli" ajaxRendered="true" />
				
				<h:outputText value="#{labels['address']}" />
				<h:inputTextarea cols="21" rows="4" value="#{clienteBean.cliente.direccion}" 
				label="dirCli"	id="dirCli" maxlength="80" required="true"/>
				<rich:message for="dirCli" ajaxRendered="true" />
				
			</h:panelGrid>			
			
			<br />
			<h:commandButton action="#{clienteBean.guardarCliente}"
				value="#{labels['save']}" id="btnGuardarCliente">
			</h:commandButton>			
			
		</h:form>

	</rich:panel>
</h:body>
</html>